<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:widget="http://www.netvibes.com/ns/">
<head>
	<meta name="author" content="Andrew Hourselt" />
	<meta name="apiVersion" content="1.0" />
	<meta name="debugMode" content="true" />

	<link rel="stylesheet" type="text/css" href="http://www.netvibes.com/themes/uwa/style.css" />
	<script type="text/javascript" src="http://www.netvibes.com/js/UWA/load.js.php?env=Standalone"></script>
 
	<widget:preferences>
		<preference name="cscid" type="text" label="CSC ID" defaultValue="TucsonAZ" />
		<preference name="timezone" type="text" label="Time zone offset" defaultValue="-7" />
	</widget:preferences>
	<title>Sun and Moon</title>

	<script type="text/javascript">
var HelloWidget = {
	parse: function(text)
	{
		var elDiv = document.createElement('div');
		elDiv.innerHTML = text;
		widget.setBody(elDiv.getElementsByTagName("table")[2]);
	}
}

widget.onLoad = function()
{
	var cscid = widget.getValue("cscid");
	var tz = widget.getValue("timezone");
	var uri = "http://www.cleardarksky.com/cgi-bin/sunmoondata.py?id="+cscid+"&tz="+tz;
	UWA.Data.getText(uri, HelloWidget.parse);
}
	</script>
</head>
<body>
	<p>Loading...</p>
</body>
</html>
